<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        div {
            font-size: 40px;
            width: 10em;
            /* 400px */
            height: 10em;
            border: solid 1px black;
            box-sizing: border-box;
        }

        p {
            font-size: 0.5em;
            /* 20px */
            width: 10em;
            /* 200px */
            height: 10em;
            border: solid 1px red;
            box-sizing: border-box;
        }

        span {
            font-size: 0.5em;
            width: 10em;
            height: 10em;
            border: solid 1px blue;
            display: block;
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <p>测试</p>

    <div>
        我是父元素div
        <p>
            我是子元素p
            <span>我是孙元素span</span>
        </p>
    </div>
</body>

</html>